package org.groovyflow.db;

import java.util.List;
import java.util.Map;

/**
 * @author ctassoni
 */
public interface SqlDao {

	public static final String UPDATE_STATMENT = "updateStatement";
	public static final String COLUMN_NAMES = "names"; 
	public static final String COLUMN_COUNT = "count";
	public static final String INSERT_STATMENT = "insertStatement";
		

	int updateDelOrInsert(String sql, Object obj);

	int updateDelOrInsert(String sql, List params);

	List<Map> doSearch(String sql);

	List<Map> doSearch(String sql, Object param);

	List<Map> doSearch(String sql, List params);

	List<Map> doSearch(String sql, List params, ResultSetCallback callback);

	//TODO NOW  Change ActiveRecord paramter to a map that holds ActiveRecord info.
	//This will let me develop with an ActiveRecord that's in the conditional-compile
	//directory.
	void findTableMetaData(ActiveRecord rec);
	
	void doActiveRecordUpdate(Map values, ActiveRecord rec);
	void doActiveRecordInsert(Map values, ActiveRecord rec);

	Map<String, Map> getTableCache();
	
	void setHandlingTimeDates(boolean handlingTimeDates);

}